﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MODEL
{
    public partial class qgzx_article
    {
        #region 纯的实体对象 + ToPOCO()
        /// <summary>
        /// 纯的实体对象
        /// </summary>
        /// <returns></returns>
        public qgzx_article ToPOCO()
        {
            qgzx_article poco = new qgzx_article()
            {
                ArticleId = this.ArticleId,
                AdminId = this.AdminId,
                Title = this.Title,
                Content = this.Content,
                Author = this.Author,
                CreateTime = this.CreateTime,
                IsAudit = this.IsAudit,
                ColumnId = this.ColumnId
            };
            return poco;
        }
        #endregion

        #region 1.0 生成 TViewModel 实体对象 +ToViewModel
        /// <summary>
        /// 生成 很纯洁的 实体对象
        /// </summary>
        /// <returns></returns>
        public ViewModel.Article ToViewModel()
        {
            ViewModel.Article poco = new ViewModel.Article()
            {
                ArticleId = this.ArticleId,
                AdminId = this.AdminId,
                Title = this.Title,
                Content = this.Content,
                Author = this.Author,
                CreateTime = this.CreateTime,
                IsAudit = this.IsAudit,
                ColumnId = this.ColumnId

            };
            return poco;
        }
        #endregion
    }
}
